﻿CREATE PROCEDURE [ServiceEngine].[GetResource]
	@ID uniqueidentifier
AS
BEGIN
	SET NOCOUNT ON;

	SELECT	N.[EntityID] as ResourceID, N.[EntityName] as [Name], R.InstanceID, R.IDL, 
	R.IDLType, R.BindingID, R.Moniker, N.EntityDescription as Description,
	R.RequestEntity, R.ResponseEntity, R.URI, R.PolicyID, R.ShareableProxy
	FROM	[ServiceEngine].Resources R
	JOIN	[ServiceEngine].Names N on N.[EntityID] = R.ResourceID and N.[EntityTypeID] = 16
	WHERE	R.ResourceID = @ID
	
END